/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.lxb.smallgame;

import org.lxb.util.SizeUtil;

/**
 *
 * @author luxinbi
 */
public class Main {

    private static MainFrame main = null;   

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
       
        if (main != null) {
            main.setVisible(false);
            main.dispose();
        }
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                main = new MainFrame();
                main.setMode(0);
                main.setMaximumSize(SizeUtil.getMaxInt());
                main.setLocation(SizeUtil.getCenterL(main));
                main.setSize(750, 560);
                main.setVisible(true);
                main.init();
            }
        });
    }

    public static void close(String s) {
        OkDialog ok = new OkDialog(main, true);
        ok.setLocation(SizeUtil.getCenterL(ok));
        ok.setTitle(s);
        ok.setVisible(true);
    }

    public static MainFrame getMain() {
        return main;
    }
}
